package jpa.generate.value;

import java.time.Instant;
import org.hibernate.Session;
import org.hibernate.tuple.ValueGenerator;

public class CurrentTimeGenerator implements ValueGenerator<Long> {

  @Override
  public Long generateValue(Session session, Object owner) {
    return Instant.now().toEpochMilli();
  }
}
